package beyjava.dao;

import java.util.Vector;

/**
 * this class is used for resource data access object
 * @author BEYJAVA
 *
 */
public interface ResourceDAO<T> {
	/**
	 * this method is used to insert new resource to system
	 * @param resource
	 * @return true if resource is inserted successfully
	 */
	public  boolean insertResource(T resource);	
	/**
	 * this method is used to remove chosen resource
	 * @param resourceID
	 * @return true if chosen resource is removed successfully
	 */
	public  boolean removeResource(int resourceID);
	/**
	 * this method is used to update chosen resource 
	 * @param updatedResource
	 * @return true if chosen resource is updated successfully
	 */
	public  boolean updateResource(T updatedResource);
	/**
	 * this method is used to get all system resource informations
	 * @return Vector<T> all system resource informations
	 */
	public  Vector<T> getAllResource();
	/**
	 * this method is used to get chosen resource
	 * @param resourceID
	 * @return Vector<T> chosen resource information
	 */
	public  Vector<T> getResource(int resourceID);
	/**
	 * this method is used to resources of chosen task
	 * @param taskID
	 * @return Vector<T> all resources of chosen task
	 */
	public  Vector<T> getResourceOfTask(int taskID);
    

}
